>> TGS_phase_analysis('Cr_single_crystal-2019-06-27-06.40um-15degrees-POS-1.txt','Cr_single_crystal-2019-06-27-06.40um-15degrees-NEG-1.txt',6.4,1)

f2 = 

     General model:
     f2(x) = A.*(erfc(q*sqrt(k*(x+start_time)))-beta*exp(-q^2*k*(x+start_time)
                    )./sqrt((x+start_time)))+B.*sin(2*pi*(peak_freq)*(x+
                    start_time)+p)*exp(-(x+start_time)/t)+D
     Coefficients (with 95% confidence bounds):
       A =     0.02227  (0.02153, 0.02302)
       k =   2.706e-05  (2.646e-05, 2.765e-05)
       beta =   3.558e-06  (2.299e-06, 4.818e-06)
       B =      0.0109  (0.01077, 0.01103)
       p =      -2.263  (-2.272, -2.254)
       t =   2.334e-08  (2.292e-08, 2.377e-08)
       D =   0.0003137  (0.0002847, 0.0003426)
     Problem parameters:
       q =   9.817e+05
       start_time =     7.5e-10
       peak_freq =    5.49e+08

ans =

   5.4901e+08